@extends('layouts.main')

@section('title', '大区指标进度汇总')

@section('content')
<div class="btn-group" role="group">
    <a href="{{ action('Report\IndexController@index') }}" class="btn btn-primary">返回报表列表</a>
</div>
<div class="clearfix"></div>
<hr>
<h3>@yield('title')</h3>
<a href="{{ action('Report\RegionIndicatorProgress@index') }}" class="btn btn-primary">表格化</a>
<div class="clearfix"></div>
<hr>
<form class="form-inline pull-right" method="get" action="{{ action('Report\RegionIndicatorProgress@visual') }}">
    
    <div class="form-group">
        <label for="year">年份</label>
        <select class="form-control" id="year" name="year">
            <option>请选择年份</option>
            @for($i = 2020; $i <= 2030; $i++)
            <option value="{{ $i }}" @if(request()->year == $i) selected @endif>{{ $i }}</option>
            @endfor
          </select>
    </div>

	<div class="form-group">
        <label for="month">月份</label>
        <select class="form-control" id="month" name="month">
            <option>请选择月份</option>
            @for($i = 1; $i <= 12; $i++)
            <option value="{{ $i }}" @if(request()->month == $i) selected @endif>{{ $i }}</option>
            @endfor
          </select>
    </div>

    <button type="submit" name="search" value="search" class="btn btn-primary">查询</button>

</form>

<div class="clearfix"></div>
<hr>


<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
<div id="main" style="width: 600px;height:400px;"></div>

<script type="text/javascript">
	// 基于准备好的dom，初始化echarts实例
	var myChart = echarts.init(document.getElementById('main'));

	// 指定图表的配置项和数据
	var option = {
		title: {
			text: 'ECharts 入门示例'
		},
		tooltip: {},
		legend: {
			data: ['销量']
		},
		xAxis: {
			data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
		},
		yAxis: {},
		series: [
			{
			name: '销量',
			type: 'bar',
			data: [5, 20, 36, 10, 10, 20]
			}
		]
	};

	// 使用刚指定的配置项和数据显示图表。
	myChart.setOption(option);
</script>
@endsection